$('#add').click(function () {
	
	 var formData = new FormData(); 
		formData.set("tittle",$("#tittle").val());
		formData.set("source",$("#source").val());
		formData.set("publishTime",$("#publish_time").val());
		formData.set("content",$("#content").val());
		formData.set("filePath", document.getElementById("file_path").files[0]);
//		formData.set("imgPath",$("#img_path").val());
	    $.ajax({
	        url: "/citrusmonitor//law.do?method=add",
	        type: "post",
	        data:formData, 
	        processData:false, 
	        contentType:false, 
	/*
    $.ajax({
        url: "/citrusmonitor//law.do?method=add",
        type: "post",
        contentType: "application/x-www-form-urlencoded;charset=utf-8",
        data: {
            "tittle": $("#tittle").val(),
            "source": $("#source").val(),
            "publishTime": $("#publish_time").val(),
            "content": $("#content").val(),
            "filePath": $("#file_path").val()
        },
        */
        dataType: "json",
        success: function (msg) {
            if (msg.status==1) {
                alert("添加成功");
            } else {
                alert("添加失败" );
            }
        },
        error:function(){
            alert("资源加载失败！！！");
        }
    })
})